﻿@{
    ViewBag.ShowFooter = false;
}
@section styles{
    @Styles.Render("~/content/default")
}
<div class="hx-container d-flex">
    <div class="flex-fill">
        @{
            Html.RenderPartial("top", Model as System.Collections.Generic.List<HxBlogs.WebApp.Models.BlogViewModel>);
        }
        <article class="partial-content mt-2" data-url="/home/loadarticle" hidden></article>
    </div>
    <div class="d-none d-md-block ml-2 pt-2">
        @{
            Html.RenderPartial("side");
        }
    </div>
</div>
@section scripts{
<script src="~/Plugins/scrollReveal/scrollReveal.js"></script>
    <script>
        $(function () {
            loadPartial();
        });
        function loadPartial() {
            $(".partial-content").each(function (index, item) {
                var url = $(item).data("url");
                if (url && url.length > 0) {
                    $(item).load(url, function (response, status, xhr) {
                        if (status == 'success') {
                            window.scrollReveal = new scrollReveal({ reset: true });
                            $(this).removeAttr('hidden');
                        } else {
                            $(this).attr('hidden');
                        }
                    });
                }
            })
        }
    </script>    
}
